package com.lovo.sys.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lovo.commom.util.ConstantUtil;
import com.lovo.sys.bean.InventoryRecordsBean;
import com.lovo.sys.mapper.IInventoryRecordsMapper;
import com.lovo.sys.service.IInventoryRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class InventoryRecordsServiceImpl implements IInventoryRecordsService {
    @Autowired
    private IInventoryRecordsMapper iInventoryRecordsMapper;
    @Override
    public IPage<InventoryRecordsBean> findAll(int pageNO) {
        return iInventoryRecordsMapper.selectPage(new Page<>(pageNO, ConstantUtil.SIZE),null);
    }

    @Override
    public void add(InventoryRecordsBean inventoryRecords) {
        iInventoryRecordsMapper.insert(inventoryRecords);
    }
}
